***Bandwagon analysis
*use bandwagon_in_dd.dta, clear

set scheme white_tableau

*Figure 1: Effect of information treatments on vote intention (reduced form)
reg vote_int exp_g2 exp_g3 exp_g4 if study==1
est store rf1
reg vote_int exp_g2 exp_g3 exp_g4 if study==2
est store rf2
reg vote_int exp_g2 exp_g3 exp_g4 if study==3
est store rf3
reg vote_int exp_g2 exp_g3 exp_g4 i.study
est store rf4
esttab rf1 rf2 rf3 rf4, obs se r2
coefplot rf1 rf2 rf3 rf4, keep(exp_g2 exp_g3 exp_g4)

*Figure 2: Effect of information treatments on outcome expectations (manipulation check/first stage)
reg exp_dummy exp_g2 exp_g3 exp_g4 if study==1
est store fsd1
reg exp_dummy exp_g2 exp_g3 exp_g4 if study==2
est store fsd2
reg exp_dummy exp_g2 exp_g3 exp_g4 if study==3
est store fsd3
reg exp_dummy exp_g2 exp_g3 exp_g4 i.study
est store fsd4
esttab fsd1 fsd2 fsd3 fsd4, obs se r2
coefplot fsd1 fsd2 fsd3 fsd4, keep(exp_g2 exp_g3 exp_g4)

*Figure 3: Effect of outcome expectations (dummy) on vote choice
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 if study==1, first robust
est store ss1_all
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 if study==2, first robust
est store ss2_all
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 if study==3, first robust
est store ss3_all
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study, first robust
est store ss4_all
esttab ss1_all ss2_all ss3_all ss4_all, obs se r2
coefplot ss1_all ss2_all ss3_all ss4_all, drop(_cons)

*Figure 4: Effect of outcome expectations (dummy) on vote choice for subsamples
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study if polint==1 | polint==2, first robust
est store mpolint_low
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study if polint==3 | polint==4, first robust
est store mpolint_high
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study if abstention==1, first robust
est store abstention_0
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study if abstention==0, first robust
est store abstention_1
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study if trustfed==1 | trustfed==2, first robust
est store trustfed_low
ivreg2 vote_int (exp_dummy = exp_g4 exp_g3) exp_g2 i.study if trustfed==3 | trustfed==4, first robust
est store trustfed_high
esttab mpolint_low mpolint_high abstention_0 abstention_1 trustfed_low trustfed_high, obs se r2
coefplot mpolint_low mpolint_high abstention_0 abstention_1 trustfed_low trustfed_high, keep(exp_dummy)


***Analyses for supplemental material***

*Part A*

*Table A1: Descriptives of all variables
bys study: summ vote_int exp_dummy trustfed polint exp_g4 exp_g3 exp_g2 age_group gender education

bys study: fre Partei_NR7  

*Table A2
table1_mc if study == 1, vars(age_group cate \ gender cate \ education cate) by(exp_group)
table1_mc if study == 2, vars(age_group cate \ gender cate \ education cate) by(exp_group)
table1_mc if study == 3, vars(age_group cate \ gender cate \ education cate) by(exp_group)

*Part B*

*Table B1
esttab rf1 rf2 rf3 rf4, obs se r2

*Table B2
esttab fsd1 fsd2 fsd3 fsd4, obs se r2

*Table B3
esttab ss1_all ss2_all ss3_all ss4_all, obs se r2

*Table B4
esttab mpolint_low mpolint_high abstention_0 abstention_1 trustfed_low trustfed_high, obs se r2

*Part C*

*Figure C1
reg vote_int exp_g2 exp_g3 exp_g4 i.age_group gender i.education i.Partei_NR7 if study==1
est store rfc1
reg vote_int exp_g2 exp_g3 exp_g4 i.age_group gender i.education i.Partei_NR7 if study==2
est store rfc2
reg vote_int exp_g2 exp_g3 exp_g4 i.age_group gender i.education i.Partei_NR7 if study==3
est store rfc3
reg vote_int exp_g2 exp_g3 exp_g4 i.age_group gender i.education i.Partei_NR7 i.study
est store rfc4
esttab rfc1 rfc2 rfc3 rfc4, obs se r2
coefplot rfc1 rfc2 rfc3 rfc4, keep(exp_g2 exp_g3 exp_g4)

*Figure C2
reg vote_int exp_g2 exp_g3 exp_g4 if study==1 & Partei_NR7==5
est store rf_green
esttab rf1 rf_green, obs se r2
coefplot rf1 rf_green, drop(_cons)

*Figure C3
reg vote_int exp_g2 exp_g3 exp_g4 i.study
est store noint1
reg vote_int exp_g4 polint exp_g4_polint exp_g3 exp_g2 i.study
est store int1
reg vote_int exp_g4 abstention exp_g4_abstention exp_g3 exp_g2 i.study
est store abst1
reg vote_int exp_g4 trustfed exp_g4_trustfed exp_g3 exp_g2 i.study
est store trust1
coefplot noint1 int1 abst1 trust1, drop(_cons)

*Table C1
ivreg2 vote_int (exp_prob = exp_g4 exp_g3) exp_g2 if study==1, first robust
est store ss1_all_cont
ivreg2 vote_int (exp_prob = exp_g4 exp_g3) exp_g2 if study==2, first robust
est store ss2_all_cont
ivreg2 vote_int (exp_prob = exp_g4 exp_g3) exp_g2 if study==3, first robust
est store ss3_all_cont
ivreg2 vote_int (exp_prob = exp_g4 exp_g3) exp_g2 i.study, first robust
est store ss4_all_cont
esttab ss1_all_cont ss2_all_cont ss3_all_cont ss4_all_cont, obs se r2
coefplot ss1_all_cont ss2_all_cont ss3_all_cont ss4_all_cont, drop(_cons)

*Part D*

*Figure D1
medeff (regress exp_dummy exp_g3 exp_g4) (regress vote_int exp_dummy exp_g3 exp_g4) if study==1, mediate(exp_dummy) treat(exp_g3) sims(1000) seed(1)
medeff (regress exp_dummy exp_g3 exp_g4) (regress vote_int exp_dummy exp_g3 exp_g4) if study==2, mediate(exp_dummy) treat(exp_g3) sims(1000) seed(1)
medeff (regress exp_dummy exp_g3 exp_g4) (regress vote_int exp_dummy exp_g3 exp_g4) if study==3, mediate(exp_dummy) treat(exp_g3) sims(1000) seed(1)

*Figure D2
medeff (regress exp_dummy exp_g3 exp_g4) (regress vote_int exp_dummy exp_g3 exp_g4) if study==1, mediate(exp_dummy) treat(exp_g4) sims(1000) seed(1)
medeff (regress exp_dummy exp_g3 exp_g4) (regress vote_int exp_dummy exp_g3 exp_g4) if study==2, mediate(exp_dummy) treat(exp_g4) sims(1000) seed(1)
medeff (regress exp_dummy exp_g3 exp_g4) (regress vote_int exp_dummy exp_g3 exp_g4) if study==3, mediate(exp_dummy) treat(exp_g4) sims(1000) seed(1)
